import {createSlice} from "@reduxjs/toolkit"
export const userSlice=createSlice({
    name:"user",
    initialState:{
        list:[],
        num:100
    },
    reducers:{
        add:(state,actions)=>{
            state.num=state.num+actions.payload
        }
    }
})
export default userSlice.reducer;
export const {add} =userSlice.actions